import React from 'react';
import './App.css';
import { HashRouter as Router, Route } from 'react-router-dom'
import AsyncComponent from './Router_lod'
const Header = AsyncComponent(() => require('./compents/Header'))
const Footer = AsyncComponent(() => require('./compents/Footer'))
const Login = AsyncComponent(() => require('./views/Login'))
const Register = AsyncComponent(() => require('./views/Register'))
const Banner = AsyncComponent(() => require('./views/Banner'))
const Index = AsyncComponent(() => require('./views/Index'))
const Moudle = AsyncComponent(() => require('./views/Moudle'))
const Xiang = AsyncComponent(() => require('./views/Xiang'))
const Detail = AsyncComponent(() => require('./views/Detail'))
function App() {
  return (
    <div className="App">
      <Router>
        <div>
          {/* <Redirect to="/Index" /> */}
          <Route exact path="/" component={Index} />
          <Route path="/Header" component={Header}></Route>
          <Route path="/Footer" component={Footer}></Route>
          <Route path="/Login" component={Login}></Route>
          <Route path="/Register" component={Register}></Route>
          <Route path="/Banner" component={Banner}></Route>
          <Route path="/Index" component={Index}></Route>
          <Route path="/Moudle" component={Moudle}></Route>
          <Route path="/Xiang" component={Xiang}></Route>
          <Route path="/Detail" component={Detail}></Route>

        </div>
      </Router>
    </div>
  );
}

export default App;
